home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / linux / xfree86 / DOC / CTLSEQS.TXT < prev    next >
Encoding:
Text File  |  1998-01-07  |  22.6 KB  |  557 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.             Xterm Control Sequences
  11.  
  12.                    Edward Moy
  13.            University of California, Berkeley
  14.  
  15.                    Revised by
  16.  
  17.                  Stephen Gildea
  18.               X Consortium (1994)
  19.  
  20.                  Thomas Dickey
  21.              XFree86 Project (1996)
  22.  
  23.  
  24.  
  25.  
  26. Definitions
  27.  
  28. c    The literal character c.
  29.  
  30. C    A single (required) character.
  31.  
  32. Ps   A single (usually optional) numeric parameter, composed of one of
  33.      more digits.
  34.  
  35. Pm   A multiple numeric parameter composed of any number of single
  36.      numeric parameters, separated by ;  character(s).
  37.  
  38. Pt   A text parameter composed of printable characters.
  39.  
  40. C1 (8-Bit) Control Characters
  41.  
  42. The xterm program recognizes both 8-bit and 7-bit control characters.
  43. It generates 7-bit controls (by default) or 8-bit if S8C1T is enabled.
  44. The following pairs of 7-bit and 8-bit control characters are equiva-
  45. lent:
  46.  
  47. ESC D
  48.      Index (IND: 0x84)
  49. ESC E
  50.      Next Line (NEL: 0x85)
  51. ESC H
  52.      Tab Set (HTS: 0x88)
  53. ESC M
  54.      Reverse Index (RI: 0x8d)
  55. ESC N
  56.      Single Shift Select of G2 Character Set (SS2: 0x8e): affects next
  57.      character only
  58. ESC O
  59.      Single Shift Select of G3 Character Set (SS3: 0x8f): affects next
  60.      character only
  61. ESC P
  62.      Device Control String (DCS: 0x90)
  63. ESC V
  64.      Start of Guarded Area (SPA: 0x96)
  65. ESC W
  66.      End of Guarded Area (EPA: 0x97)
  67. ESC X
  68.      Start of String (SOS: 0x98)
  69. ESC Z
  70.      Return Terminal ID (DECID: 0x9a).    Obsolete form of CSI c    (DA).
  71. ESC [
  72.      Control Sequence Introducer (CSI: 0x9b)
  73. ESC \
  74.      String Terminator (ST: 0x9c)
  75. ESC ]
  76.      Operating System Command (OSC: 0x9d)
  77. ESC ^
  78.      Privacy Message (PM: 0x9e)
  79. ESC _
  80.      Application Program Command (APC: 0x9f)
  81.  
  82. These control characters are used in the vtXXX emulation.
  83.  
  84. VT100 Mode
  85. Most of these control sequences are standard VT102 control sequences,
  86. but there is support for later DEC VT terminals (i.e., VT220 and VT320),
  87. as well as ISO 6429 and aixterm color controls.  VT102 features not sup-
  88. ported are double size characters and blinking characters.  There are
  89. additional control sequences to provide xterm-dependent functions, such
  90. as the scrollbar or window size.  Where the function is specified by DEC
  91. or ISO 6429, the code assigned to it is given in parentheses.  The
  92. escape codes to designate and invoke character sets are specified by ISO
  93. 2022; see that document for a discussion of character sets.
  94.  
  95. BEL           Bell (Ctrl-G)
  96. BS           Backspace (Ctrl-H)
  97. CR           Carriage Return (Ctrl-M)
  98. ENQ           Return Terminal Status (Ctrl-E).  Response is the termi-
  99.            nal name, e.g., "xterm".
  100. FF           Form Feed or New Page (NP) (Ctrl-L) same as LF
  101. LF           Line Feed or New Line (NL) (Ctrl-J)
  102. SO           Shift Out (Ctrl-N) -> Switch to Alternate Character Set:
  103.            invokes the G1 character set.
  104. SP           Space.
  105. TAB           Horizontal Tab (HT) (Ctrl-I)
  106. VT           Vertical Tab (Ctrl-K) same as LF
  107. SI           Shift In (Ctrl-O) -> Switch to Standard Character Set:
  108.            invokes the G0 character set (the default).
  109.  
  110. ESC SP F       7-bit controls (S7C1T).
  111. ESC SP G       8-bit controls (S8C1T).
  112. ESC SP L       Set ANSI conformance level 1 (vt100, 7-bit controls).
  113. ESC SP M       Set ANSI conformance level 2 (vt200).
  114. ESC SP N       Set ANSI conformance level 3 (vt300).
  115. ESC # 8        DEC Screen Alignment Test (DECALN)
  116. ESC ( C        Designate G0 Character Set (ISO 2022)
  117.          C = 0    -> DEC Special Character and Line Drawing Set
  118.          C = A    -> United Kingdom (UK)
  119.          C = B    -> United States (USASCII)
  120. ESC ) C        Designate G1 Character Set (ISO 2022)
  121.          C = 0    -> DEC Special Character and Line Drawing Set
  122.          C = A    -> United Kingdom (UK)
  123.          C = B    -> United States (USASCII)
  124. ESC * C        Designate G2 Character Set (ISO 2022)
  125.          C = 0    -> DEC Special Character and Line Drawing Set
  126.          C = A    -> United Kingdom (UK)
  127.          C = B    -> United States (USASCII)
  128. ESC + C        Designate G3 Character Set (ISO 2022)
  129.          C = 0    -> DEC Special Character and Line Drawing Set
  130.          C = A    -> United Kingdom (UK)
  131.          C = B    -> United States (USASCII)
  132. ESC 7           Save Cursor (DECSC)
  133. ESC 8           Restore Cursor (DECRC)
  134. ESC =           Application Keypad (DECPAM)
  135. ESC >           Normal Keypad (DECPNM)
  136. ESC F           Cursor to lower left corner of screen (if enabled by the
  137.            hpLowerleftBugCompat resource).
  138. ESC c           Full Reset (RIS)
  139. ESC l           Memory Lock (per HP terminals).    Locks memory above the
  140.            cursor.
  141. ESC m           Memory Unlock (per HP terminals)
  142. ESC n           Invoke the G2 Character Set (LS2)
  143. ESC o           Invoke the G3 Character Set (LS3)
  144. ESC |           Invoke the G3 Character Set as GR (LS3R).  Has no visible
  145.            effect in xterm.
  146. ESC }           Invoke the G2 Character Set as GR (LS2R).  Has no visible
  147.            effect in xterm.
  148. ESC ~           Invoke the G1 Character Set as GR (LS1R).  Has no visible
  149.            effect in xterm.
  150.  
  151. APC Pt ST      xterm implements no APC functions; Pt is ignored.  Pt
  152.            need not be printable characters.
  153.  
  154. DCS Ps; Ps| Pt ST
  155.            User-Defined Keys (DECUDK).  The first parameter:
  156.          Ps = 0  -> Clear all UDK definitions before starting
  157.            (default)
  158.          Ps = 1  -> Erase Below (default)
  159.            The second parameter:
  160.          Ps = 0  -> Lock the keys (default)
  161.          Ps = 1  -> Do not lock.
  162.            The third parameter is a ';'-separated list of strings
  163.            denoting the key-code separated by a '/' from the hex-
  164.            encoded key value.  The key codes correspond to the DEC
  165.            function-key codes (e.g., F6=17).
  166. DCS $ q Pt ST  Request Status String (DECRQSS).  The string following
  167.            the "q" is one of the following:
  168.          " q     -> DECSCA
  169.          " p     -> DECSCL
  170.          r     -> DECSTBM
  171.          m     -> SGR
  172.            xterm responds with DCS 1 $ r Pt ST for valid requests,
  173.            replacing the Pt with the corresponding CSI string, or
  174.            DCS 0 $ r Pt ST for invalid requests.
  175.  
  176. CSI Ps @       Insert Ps (Blank) Character(s) (default = 1) (ICH)
  177. CSI Ps A       Cursor Up Ps Times (default = 1) (CUU)
  178. CSI Ps B       Cursor Down Ps Times (default = 1) (CUD)
  179. CSI Ps C       Cursor Forward Ps Times (default = 1) (CUF)
  180. CSI Ps D       Cursor Backward Ps Times (default = 1) (CUB)
  181. CSI Ps E       Cursor Next Line Ps Times (default = 1) (CNL)
  182. CSI Ps F       Cursor Preceding Line Ps Times (default = 1) (CPL)
  183. CSI Ps G       Cursor Character Absolute  [column] (default = [row,1])
  184.            (CHA)
  185. CSI Ps ; Ps H  Cursor Position [row;column] (default = [1,1]) (CUP)
  186. CSI Ps I       Cursor Forward Tabulation Ps tab stops (default = 1)
  187.            (CHT)
  188. CSI Ps J       Erase in Display (ED)
  189.          Ps = 0  -> Erase Below (default)
  190.          Ps = 1  -> Erase Above
  191.          Ps = 2  -> Erase All
  192. CSI Ps ?  J    Erase in Display (DECSED)
  193.          Ps = 0  -> Selective Erase Below (default)
  194.          Ps = 1  -> Selective Erase Above
  195.          Ps = 2  -> Selective Erase All
  196. CSI Ps K       Erase in Line (EL)
  197.          Ps = 0  -> Erase to Right (default)
  198.          Ps = 1  -> Erase to Left
  199.          Ps = 2  -> Erase All
  200. CSI Ps ?  K    Erase in Line (DECSEL)
  201.          Ps = 0  -> Selective Erase to Right (default)
  202.          Ps = 1  -> Selective Erase to Left
  203.          Ps = 2  -> Selective Erase All
  204. CSI Ps L       Insert Ps Line(s) (default = 1) (IL)
  205. CSI Ps M       Delete Ps Line(s) (default = 1) (DL)
  206. CSI Ps P       Delete Ps Character(s) (default = 1) (DCH)
  207. CSI Ps S       Scroll up Ps lines (default = 1) (SU)
  208. CSI Ps T       Scroll down Ps lines (default = 1) (SD, according to DEC)
  209. CSI Ps ; Ps ; Ps ; Ps ; Ps T
  210.            Initiate hilite mouse tracking.    Parameters are
  211.            [func;startx;starty;firstrow;lastrow].  See the section
  212.            Mouse Tracking.
  213. CSI Ps X       Erase Ps Character(s) (default = 1) (ECH)
  214. CSI Ps Z       Cursor Backward Tabulation Ps tab stops (default = 1)
  215.            (CBT)
  216. CSI Ps ^       Scroll down Ps lines (default = 1) (SD, according to ISO)
  217. CSI Pm `       Character Position Absolute  [column] (default = [row,1])
  218.            (HPA)
  219. CSI Ps b       Repeat the preceding graphic character Ps times (REP)
  220. CSI Ps c       Send Device Attributes (DA)
  221.          Ps = 0  or omitted -> request attributes from terminal
  222.          -> CSI ? 1 ; 2 c  (``I am a VT100 with Advanced Video
  223.            Option.'')
  224. CSI Pm d       Line Position Absolute  [row] (default = [1,column])
  225.            (VPA)
  226. CSI Ps ; Ps f  Horizontal and Vertical Position [row;column] (default =
  227.            [1,1]) (HVP)
  228. CSI Ps g       Tab Clear (TBC)
  229.          Ps = 0  -> Clear Current Column (default)
  230.          Ps = 3  -> Clear All
  231. CSI Pm h       Set Mode (SM)
  232.          Ps = 4  -> Insert Mode (IRM)
  233.          Ps = 2 0  -> Automatic Newline (LNM)
  234. CSI Pm l       Reset Mode (RM)
  235.          Ps = 4  -> Replace Mode (IRM)
  236.          Ps = 2 0  -> Normal Linefeed (LNM)
  237. CSI Pm m       Character Attributes (SGR)
  238.          Ps = 0  -> Normal (default)
  239.          Ps = 1  -> Bold
  240.          Ps = 4  -> Underlined
  241.          Ps = 5  -> Blink (appears as Bold)
  242.          Ps = 7  -> Inverse
  243.          Ps = 2 2  -> Normal (neither bold nor faint)
  244.          Ps = 2 4  -> Not underlined
  245.          Ps = 2 5  -> Steady (not blinking)
  246.          Ps = 2 7  -> Positive (not inverse)
  247.          Ps = 3 0  -> Set foreground color to Black
  248.          Ps = 3 1  -> Set foreground color to Red
  249.          Ps = 3 2  -> Set foreground color to Green
  250.          Ps = 3 3  -> Set foreground color to Yellow
  251.          Ps = 3 4  -> Set foreground color to Blue
  252.          Ps = 3 5  -> Set foreground color to Magenta
  253.          Ps = 3 7  -> Set foreground color to Cyan
  254.          Ps = 3 7  -> Set foreground color to White
  255.          Ps = 3 9  -> Set foreground color to default (original)
  256.          Ps = 4 0  -> Set background color to Black
  257.          Ps = 4 1  -> Set background color to Red
  258.          Ps = 4 2  -> Set background color to Green
  259.          Ps = 4 3  -> Set background color to Yellow
  260.          Ps = 4 4  -> Set background color to Blue
  261.          Ps = 4 5  -> Set background color to Magenta
  262.          Ps = 4 6  -> Set background color to Cyan
  263.          Ps = 4 7  -> Set background color to White
  264.          Ps = 4 9  -> Set background color to default (origi-
  265.            nal).
  266.  
  267.            If 16-color support is compiled, the following apply.
  268.            Assume that xterm's resources are set so that the ISO
  269.            color codes are the first 8 of a set of 16.  Then the
  270.            aixterm colors are the bright versions of the ISO colors:
  271.          Ps = 9 0  -> Set foreground color to Black
  272.          Ps = 9 1  -> Set foreground color to Red
  273.          Ps = 9 2  -> Set foreground color to Green
  274.          Ps = 9 3  -> Set foreground color to Yellow
  275.          Ps = 9 4  -> Set foreground color to Blue
  276.          Ps = 9 5  -> Set foreground color to Magenta
  277.          Ps = 9 7  -> Set foreground color to Cyan
  278.          Ps = 9 7  -> Set foreground color to White
  279.          Ps = 1 0 0  -> Set background color to Black
  280.          Ps = 1 0 1  -> Set background color to Red
  281.          Ps = 1 0 2  -> Set background color to Green
  282.          Ps = 1 0 3  -> Set background color to Yellow
  283.          Ps = 1 0 4  -> Set background color to Blue
  284.          Ps = 1 0 5  -> Set background color to Magenta
  285.          Ps = 1 0 6  -> Set background color to Cyan
  286.          Ps = 1 0 7  -> Set background color to White
  287.  
  288.            If xterm is compiled with the 16-color support disabled,
  289.            it supports the following, from rxvt:
  290.          Ps = 1 0 0  -> Set foreground and background color to
  291.            default
  292.  
  293. CSI Ps n       Device Status Report (DSR)
  294.          Ps = 5  -> Status Report CSI 0 n  (``OK'')
  295.          Ps = 6  -> Report Cursor Position (CPR) [row;column] as
  296.            CSI r ; c R
  297. CSI Ps ? n     Device Status Report (DSR, DEC-specific)
  298.          Ps = 6  -> Report Cursor Position (CPR) [row;column] as
  299.            CSI ? r ; c R (assumes page is zero).
  300.          Ps = 1 5  -> Report Printer status as CSI ? 1 0  n
  301.            (ready) or CSI ? 1 1  n    (not ready)
  302.          Ps = 2 5  -> Report UDK status as CSI ? 2 0  n
  303.            (unlocked) or CSI ? 2 1    n  (locked)
  304.          Ps = 2 6  -> Report Keyboard status as CSI ? 2 7  ;  1
  305.            ;  0  ;    0  n  (North American)
  306. CSI  ! p       Soft terminal reset (DECSTR)
  307. CSI Ps ; Ps " p
  308.            Set conformance level (DECSCL) Valid values for the first
  309.            parameter:
  310.          Ps = 6 1  -> VT100
  311.          Ps = 6 2  -> VT200
  312.          Ps = 6 3  -> VT300 Valid values for the second parame-
  313.            ter:
  314.          Ps = 0  -> 8-bit controls
  315.          Ps = 1  -> 7-bit controls (always set for VT100)
  316.          Ps = 2  -> 8-bit controls
  317. CSI Ps " q     Select character protection attribute (DECSCA).    Valid
  318.            values for the parameter:
  319.          Ps = 0  -> DECSED and DECSEL can erase (default)
  320.          Ps = 1  -> DECSED and DECSEL cannot erase
  321.          Ps = 2  -> DECSED and DECSEL can erase
  322. CSI Ps ; Ps r  Set Scrolling Region [top;bottom] (default = full size of
  323.            window) (DECSTBM)
  324. CSI Ps ;  Ps ; Ps t
  325.            Window manipulation (from dtterm).  Valid values for the
  326.            first (and any additional parameters) are:
  327.          Ps = 1  -> Restore (de-iconify) window.
  328.          Ps = 2  -> Minimize (iconify) window.
  329.          Ps = 3  ; x ; y -> Move window to [x, y].
  330.          Ps = 4  ; height ; width -> Resize the xterm window to
  331.            height and width in pixels.
  332.          Ps = 5  -> Raise the xterm window to the front of the
  333.            stacking order.
  334.          Ps = 6  -> Lower the xterm window to the bottom of the
  335.            stacking order.
  336.          Ps = 7  -> Refresh the xterm window.
  337.          Ps = 8  ; height ; width -> Resize the text area to
  338.            [height;width] in characters.
  339.          Ps = 1 1  -> Report xterm window state.  If the xterm
  340.            window is open (non-iconified), it returns CSI 1 t .  If
  341.            the xterm window is iconified, it returns CSI 2 t .
  342.          Ps = 1 3  -> Report xterm window position as CSI 3 ; x;
  343.            yt
  344.          Ps = 1 4  -> Report xterm window in pixels as CSI  4  ;
  345.            height ;  width t
  346.          Ps = 1 8  -> Report the size of the text area in char-
  347.            acters as CSI  8  ;  height ;  widtht
  348.          Ps = 2 0  -> Report xterm window's icon label as OSC  L
  349.            label ST
  350.          Ps = 2 1  -> Report xterm window's title as OSC  l
  351.            title ST
  352.          Ps >= 2 4  -> Resize to Ps lines (DECSLPP)
  353. CSI Ps x       Request Terminal Parameters (DECREQTPARM)
  354. CSI ? Pm h     DEC Private Mode Set (DECSET)
  355.          Ps = 1  -> Application Cursor Keys (DECCKM)
  356.          Ps = 2  -> Designate USASCII for character sets G0-G3
  357.            (DECANM), and set VT100 mode.
  358.          Ps = 3  -> 132 Column Mode (DECCOLM)
  359.          Ps = 4  -> Smooth (Slow) Scroll (DECSCLM)
  360.          Ps = 5  -> Reverse Video (DECSCNM)
  361.          Ps = 6  -> Origin Mode (DECOM)
  362.          Ps = 7  -> Wraparound Mode (DECAWM)
  363.          Ps = 8  -> Auto-repeat Keys (DECARM)
  364.          Ps = 9  -> Send Mouse X & Y on button press.  See the
  365.            section Mouse Tracking.
  366.          Ps = 2 5  -> Show Cursor (DECTCEM)
  367.          Ps = 3 8  -> Enter Tektronix Mode (DECTEK)
  368.          Ps = 4 0  -> Allow 80 -> 132 Mode
  369.          Ps = 4 1  -> more(1) fix (see curses resource)
  370.          Ps = 4 4  -> Turn On Margin Bell
  371.          Ps = 4 5  -> Reverse-wraparound Mode
  372.          Ps = 4 6  -> Start Logging (normally disabled by a com-
  373.            pile-time option)
  374.          Ps = 4 7  -> Use Alternate Screen Buffer (unless dis-
  375.            abled by the titeInhibit resource)
  376.          Ps = 1 0 0 0  -> Send Mouse X & Y on button press and
  377.            release.  See the section Mouse Tracking.
  378.          Ps = 1 0 0 1  -> Use Hilite Mouse Tracking.  See the
  379.            section Mouse Tracking.
  380. CSI ? Pm l     DEC Private Mode Reset (DECRST)
  381.          Ps = 1  -> Normal Cursor Keys (DECCKM)
  382.          Ps = 2  -> Designate VT52 mode (DECANM).
  383.          Ps = 3  -> 80 Column Mode (DECCOLM)
  384.          Ps = 4  -> Jump (Fast) Scroll (DECSCLM)
  385.          Ps = 5  -> Normal Video (DECSCNM)
  386.          Ps = 6  -> Normal Cursor Mode (DECOM)
  387.          Ps = 7  -> No Wraparound Mode (DECAWM)
  388.          Ps = 8  -> No Auto-repeat Keys (DECARM)
  389.          Ps = 9  -> Don't Send Mouse X & Y on button press
  390.          Ps = 2 5  -> Hide Cursor (DECTCEM)
  391.          Ps = 4 0  -> Disallow 80 -> 132 Mode
  392.          Ps = 4 1  -> No more(1) fix (see curses resource)
  393.          Ps = 4 4  -> Turn Off Margin Bell
  394.          Ps = 4 5  -> No Reverse-wraparound Mode
  395.          Ps = 4 6  -> Stop Logging (normally disabled by a com-
  396.            pile-time option)
  397.          Ps = 4 7  -> Use Normal Screen Buffer
  398.          Ps = 1 0 0 0  -> Don't Send Mouse X & Y on button press
  399.            and release
  400.          Ps = 1 0 0 1  -> Don't Use Hilite Mouse Tracking
  401. CSI ? Pm r     Restore DEC Private Mode Values.  The value of Ps previ-
  402.            ously saved is restored.  Ps values are the same as for
  403.            DECSET.
  404. CSI ? Pm s     Save DEC Private Mode Values.  Ps values are the same as
  405.            for DECSET.
  406.  
  407. OSC Ps ; Pt ST
  408. OSC Ps ; Pt BEL
  409.            Set Text Parameters
  410.          Ps = 0  -> Change Icon Name and Window Title to Pt
  411.          Ps = 1  -> Change Icon Name to Pt
  412.          Ps = 2  -> Change Window Title to Pt
  413.          Ps = 1 0  -> Change color names starting with text
  414.            foreground to Pt (a list of one or more color names, sep-
  415.            arated by semicolon, up to color6).
  416.          Ps = 1 1  -> Change colors starting with text back-
  417.            ground to Pt
  418.          Ps = 1 2  -> Change colors starting with text cursor to
  419.            Pt
  420.          Ps = 1 3  -> Change colors starting with mouse fore-
  421.            ground to Pt
  422.          Ps = 1 4  -> Change colors starting with mouse back-
  423.            ground to Pt
  424.          Ps = 1 5  -> Change colors starting with Tek foreground
  425.            to Pt
  426.          Ps = 1 6  -> Change colors starting with Tek background
  427.            to Pt
  428.          Ps = 4 6  -> Change Log File to Pt (normally disabled
  429.            by a compile-time option)
  430.          Ps = 5 0  -> Set Font to Pt
  431.  
  432. PM Pt ST       xterm implements no PM functions; Pt is ignored.  Pt need
  433.            not be printable characters.
  434.  
  435. Mouse Tracking
  436. The VT widget can be set to send the mouse position and other informa-
  437. tion on button presses.  These modes are typically used by editors and
  438. other full-screen applications that want to make use of the mouse.
  439. There are three mutually exclusive modes, each enabled (or disabled) by
  440. a different parameter in the DECSET (or DECRST) escape sequence.  Param-
  441. eters for all mouse tracking escape sequences generated by xterm encode
  442. numeric parameters in a single character as value+040.    For example, !
  443. is 1.  The screen coodinate system is 1-based.
  444. X10 compatibility mode sends an escape sequence on button press encoding
  445. the location and the mouse button pressed.  It is enabled by specifying
  446. parameter 9 to DECSET.    On button press, xterm sends CSI M CbCxCy (6
  447. characters).  Cb is button-1.  Cx and Cy are the x and y coordinates of
  448. the mouse when the button was pressed.
  449. Normal tracking mode sends an escape sequence on both button press and
  450. release.  Modifier information is also sent.  It is enabled by specify-
  451. ing parameter 1000 to DECSET.  On button press or release, xterm sends
  452. CSI M CbCxCy.  The low two bits of Cb encode button information: 0=MB1
  453. pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release.  The upper bits encode
  454. what modifiers were down when the button was pressed and are added
  455. together.  4=Shift, 8=Meta, 16=Control.  Cx and Cy are the x and y coor-
  456. dinates of the mouse event.  The upper left corner is (1,1).
  457. Mouse hilite tracking notifies a program of a button press, receives a
  458. range of lines from the program, highlights the region covered by the
  459. mouse within that range until button release, and then sends the program
  460. the release coordinates.  It is enabled by specifying parameter 1001 to
  461. DECSET.  Highlighting is performed only for button 1, though other but-
  462. ton events can be received.  Warning: use of this mode requires a coop-
  463. erating program or it will hang xterm.    On button press, the same infor-
  464. mation as for normal tracking is generated; xterm then waits for the
  465. program to send mouse tracking information.  All X events are ignored
  466. until the proper escape sequence is received from the pty: CSI Ps ; Ps ;
  467. Ps ; Ps ; Ps T .  The parameters are func, startx, starty, firstrow, and
  468. lastrow.  func is non-zero to initiate hilite tracking and zero to
  469. abort.    startx and starty give the starting x and y location for the
  470. highlighted region.  The ending location tracks the mouse, but will
  471. never be above row firstrow and will always be above row lastrow.  (The
  472. top of the screen is row 1.)  When the button is released, xterm reports
  473. the ending position one of two ways: if the start and end coordinates
  474. are valid text locations: CSI t CxCy.  If either coordinate is past the
  475. end of the line: CSI T CxCyCxCyCxCy.  The parameters are startx, starty,
  476. endx, endy, mousex, and mousey.  startx, starty, endx, and endy give the
  477. starting and ending character positions of the region.    mousex and
  478. mousey give the location of the mouse at button up, which may not be
  479. over a character.
  480.  
  481. Tektronix 4014 Mode
  482. Most of these sequences are standard Tektronix 4014 control sequences.
  483. Graph mode supports the 12-bit addressing of the Tektronix 4014.  The
  484. major features missing are the write-through and defocused modes.  This
  485. document does not describe the commands used in the various Tektronix
  486. plotting modes but does describe the commands to switch modes.
  487.  
  488. BEL           Bell (Ctrl-G)
  489. BS           Backspace (Ctrl-H)
  490. TAB           Horizontal Tab (Ctrl-I)
  491. LF           Line Feed or New Line (Ctrl-J)
  492. VT           Cursor up (Ctrl-K)
  493. FF           Form Feed or New Page (Ctrl-L)
  494. CR           Carriage Return (Ctrl-M)
  495. ESC ETX        Switch to VT100 Mode (ESC Ctrl-C)
  496. ESC ENQ        Return Terminal Status (ESC Ctrl-E)
  497. ESC FF           PAGE (Clear Screen) (ESC Ctrl-L)
  498. ESC SO           Begin 4015 APL mode (ignored by xterm) (ESC Ctrl-N)
  499. ESC SI           End 4015 APL mode (ignored by xterm) (ESC Ctrl-O)
  500. ESC ETB        COPY (Save Tektronix Codes to file COPYyyyy-mm-
  501.            dd.hh:mm:ss) (ESC Ctrl-W)
  502. ESC CAN        Bypass Condition (ESC Ctrl-X)
  503. ESC SUB        GIN mode (ESC Ctrl-Z)
  504. ESC FS           Special Point Plot Mode (ESC Ctrl-\)
  505. ESC 8           Select Large Character Set
  506. ESC 9           Select #2 Character Set
  507. ESC :           Select #3 Character Set
  508. ESC ;           Select Small Character Set
  509. OSC Ps ; Pt BEL
  510.            Set Text Parameters of VT window
  511.          Ps = 0  -> Change Icon Name and Window Title to Pt
  512.          Ps = 1  -> Change Icon Name to Pt
  513.          Ps = 2  -> Change Window Title to Pt
  514.          Ps = 4 6  -> Change Log File to Pt (normally disabled
  515.            by a compile-time option)
  516. ESC `           Normal Z Axis and Normal (solid) Vectors
  517. ESC a           Normal Z Axis and Dotted Line Vectors
  518. ESC b           Normal Z Axis and Dot-Dashed Vectors
  519. ESC c           Normal Z Axis and Short-Dashed Vectors
  520. ESC d           Normal Z Axis and Long-Dashed Vectors
  521. ESC h           Defocused Z Axis and Normal (solid) Vectors
  522. ESC i           Defocused Z Axis and Dotted Line Vectors
  523. ESC j           Defocused Z Axis and Dot-Dashed Vectors
  524. ESC k           Defocused Z Axis and Short-Dashed Vectors
  525. ESC l           Defocused Z Axis and Long-Dashed Vectors
  526. ESC p           Write-Thru Mode and Normal (solid) Vectors
  527. ESC q           Write-Thru Mode and Dotted Line Vectors
  528. ESC r           Write-Thru Mode and Dot-Dashed Vectors
  529. ESC s           Write-Thru Mode and Short-Dashed Vectors
  530. ESC t           Write-Thru Mode and Long-Dashed Vectors
  531. FS           Point Plot Mode (Ctrl-\)
  532. GS           Graph Mode (Ctrl-])
  533. RS           Incremental Plot Mode (Ctrl-^)
  534. US           Alpha Mode (Ctrl-_)
  535.  
  536. VT52 Mode
  537. Parameters for cursor movement are at the end of the ESC Y  escape
  538. sequence.  Each ordinate is encoded in a single character as value+040.
  539. For example, !    is 1.  The screen coodinate system is 0-based.
  540.  
  541. ESC A           Cursor up.
  542. ESC B           Cursor down.
  543. ESC C           Cursor right.
  544. ESC D           Cursor left.
  545. ESC F           Enter graphics mode.
  546. ESC G           Exit graphics mode.
  547. ESC H           Move the cursor to the home position.
  548. ESC I           Reverse line feed.
  549. ESC J           Erase from the cursor to the end of the screen.
  550. ESC K           Erase from the cursor to the end of the line.
  551. ESC Y Ps Ps    Move the cursor to given row and column.
  552. ESC Z           Identify
  553.          -> ESC  /  Z  (``I am a VT52.'')
  554. ESC =           Enter alternate keypad mode.
  555. ESC >           Exit alternate keypad mode.
  556. ESC <           Exit VT52 mode (Enter VT100 mode).
  557.